import { createApp } from "vue";
import { createPinia } from "pinia";
import App from "./App.vue";
import router from "./router";
import globalComponents from "./global-components";
import utils from "./utils";
import "./assets/css/app.css";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import common from "./utils/common";
import { library } from "@fortawesome/fontawesome-svg-core";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import 'vant/lib/index.css'
import { fas } from "@fortawesome/free-solid-svg-icons";
library.add(fas)
// 引入echarts
import * as echarts from 'echarts'

const app = createApp(App).use(router).use(createPinia());
app.use(ElementPlus, {
  locale: zhCn,
});

// 全局挂载 echarts
app.config.globalProperties.$echarts = echarts

app.component("font-awesome-icon", FontAwesomeIcon);
// 使用插件
app.use(common);
globalComponents(app);
utils(app);

app.mount("#app");
